package com.xmkj.bearuser.pk;

import android.content.Context;
import android.widget.ImageView;

import com.common.widget.imageview.image.ImageLoaderUtils;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.bearuser.R;

import java.util.List;

/**
 * Create by leo
 * 创建日期：2018/9/29
 * 描述：
 */

public class ImageAdapter extends CommonAdapter<String> {
    public ImageAdapter(Context context, List<String> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, String item, int position) {
        ImageView view = holder.getView(R.id.iv_img);
        ImageLoaderUtils.displayAllImg(view,item);
    }

    @Override
    protected int getItemViewLayoutId(int position, String item) {
        return R.layout.item_image;
    }
}
